package com.service.impl;

import com.bean.Role;
import com.bean.Seckill;
import com.bean.User;
import com.dao.UserRoleMapper;
import com.dao.UserSeckillMapper;
import com.service.UserRoleService;
import com.service.UserSeckillService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author FatterShadystart
 * @create 2023-02-01 11:05
 */
@Service
public class UserSeckillServiceImpl implements UserSeckillService {
    @Resource
    private UserSeckillMapper userSeckillMapper;

    @Override
    public Long selectByUserIdAndSeckillId(User user, Seckill seckill) {
        return userSeckillMapper.selectByUserIdAndSeckillId(user,seckill);
    }

    @Override
    public Integer insert(Long userId, Long seckillId) {
        return userSeckillMapper.insert(userId,seckillId);
    }

    @Override
    public Integer deleteBatch(List<Long> userSeckillIdList) {
        return userSeckillMapper.deleteBatch(userSeckillIdList);
    }
}
